package com.arpa.wms.domain.entity;

import com.arpa.wms.domain.enums.BillingUnitEnum;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.Digits;
import javax.validation.constraints.Min;
import java.math.BigDecimal;

/**
 * <p>
 * 仓库合同作业费
 * </p>
 *
 * @author LEO
 * @since 2020-11-17
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("wms_contract_operation_cost")
@ApiModel(value="ContractOperationCost对象", description="仓库合同作业费")
public class ContractOperationCost extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "记录标识",hidden = true)
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "组织机构")
    @TableField("group_code")
    private String groupCode;

    @ApiModelProperty(value = "合同号",hidden = true)
    @TableField("contract_code")
    private String contractCode;

    @ApiModelProperty(value = "费用类型标识（数据字典:wmsFeeType）",required = true,notes = "通过系统字典获取作业费用类型")
    //@NotNull(message = "作业费：费用类型不能为空")
    @TableField("fee_type")
    private String feeType;

    @ApiModelProperty(value = "作业费单价",required = true,notes = "作业费单价,大于等于0的正数")
    @Min(value = 0,message = "作业费：单价不能小于0")
    @Digits(integer = 14,fraction = 6,message = "作业费：请输入正确单价")
    @TableField("unit_price")
    private BigDecimal unitPrice;

    @ApiModelProperty(value = "计费单位：PIECE（件），TON（吨），LOCATION（库位）",required = true,notes = "英文为大写")
    //@NotNull(message = "作业费：计费单位不能为空")
    @TableField("billing_unit")
    private BillingUnitEnum billingUnit;

    @ApiModelProperty(value = "入库显示:0不显示，1显示",required = true)
    @TableField("inbound_use")
    private Integer inboundUse;

    @ApiModelProperty(value = "出库显示：0不显示，1显示",required = true)
    @TableField("outbound_use")
    private Integer outboundUse;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;


}
